type TStu = {
  name: string;
  gender: string;
  study(): void;
}

const stu: TStu = {
  name: 'xxx',
  gender: 'man',
  study() {
    console.log('学学学')
  },
}

// 描述对象也可以用 interface（接口）
interface IStu {
  name: string
  gender: string
  study(): void;
}

const stu2: IStu = {
  name: 'xxx',
  gender: 'man',
  study() {
    console.log('学学学')
  },
}

// interface 可以继承
interface Point2D {
  x: number
  y: number
}
interface Point3D extends Point2D {
  // x: number
  // y: number
  z: number
}

const pos: Point3D = {
  x: 88,
  y: 47,
  z: 99,
}

export { }